package com.dao.impl;

import com.bean.UserTopic;
import com.dao.UserTopicDao;
import com.util.AliPool;
import org.apache.commons.dbutils.QueryRunner;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * @author 冥尘
 * 用户题库dao实现类
 */
public class UserTopicDaoImpl implements UserTopicDao {
    QueryRunner runner =new QueryRunner();

    @Override
    public int insertTopicKu(UserTopic ut) throws SQLException {
        String sql="insert into userTopicKu values(?,?,?)";
        Connection conn= AliPool.getConn();
        int i=runner.update(conn,sql,ut.getUtID(),ut.getuID(),ut.gettName());
        conn.close();
        return i;
    }
}
